Lesson: 22 - Functions (Pre-defined)

Purpose : Teach pre-defined functions. Students will learn the use of functions.

Materials Required

Scratch 3.0

Prior knowledge

Students should know about the work of blocks in scratch.

Exercises
  • Click here to see the video to know about what pre-defined function is.

Exercise:1



  1. Create a scratch code to make a sprite walk. (After doing this exercise, the teacher has to explain that this code is done by using the pre-defined(inbuilt) functions in scratch.)



  2. Optional Exercises:



    Exercise:2



  3. There are multiple pumpkins in each patch! Look carefully at the function definitions below to figure out how to use each one.


  4. other exercise image

    Exercise:3



  5. Try your functions for a longer path.


  6. other exercise image

    Exercise:4



  7. Try to solve this puzzle using a smaller number of blocks.


  8. other exercise image

    Solutions




Teacher's Instruction
  1. Teachers should give their own creative activity to help students understand pre-defined functions.(Using the predefined blocks in scratch.)
  2. Teachers can use the video to know about pre-defined functions.
  3. The teacher should explain how function blocks reduce the total number of blocks. How it abstracts one logic in one place so that it can be used at many places. This needs to be explained with real examples. Taking lift to floor ā€œNā€. Once you learn this once, you can do this in any building. If you need to support another kind of lift, change is required only in one place etc.